home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10713 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 9 Mar 1996 12:53:14 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4hsk2q$bas@solutions.solon.com>
  8. References: <00001a73+00002504@msn.com> <dewar.826146475@schonberg> <4hmlca$a30@solutions.solon.com> <4horqr$1kd@unda.fi>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <4horqr$1kd@unda.fi>, Olavi Sakari <olle@gustav.unda.fi> wrote:
  12. >In article <4hmlca$a30@solutions.solon.com>, seebs@solutions.solon.com (Peter Seebach) writes:
  13. > > I have to admit, I've only seen them used in NetHack.  No other code I've
  14. > > ever read used bitfields.  :)
  15.  
  16. >Hmmm... Then you have never read the *.h files in (Unix) /usr/include/sys
  17. >or /usr/include? :-)
  18.  
  19. Nope, and sure enough, there's bitfields there on my system.  Of course,
  20. they're only in the networking, hardware, and filesystem code.  There are
  21. none in any of the standard library functions, and none in any code the
  22. user is likely to be correct to be mucking with.  They appear to be
  23. pretty useful for internals, if mildly unportable.  (The code appears
  24. to depend on "unsigned foo:4, bar:4" being packed as an unsigned char.)
  25.  
  26. Cool!  Now I'll believe they're useful.
  27.  
  28. Maybe I should start using bitfields.
  29.  
  30. -s
  31. -- 
  32. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  33. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  34. FUCK the communications decency act.  Goddamned government.  [literally.]
  35. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  36.